//封装所有请求路径
import service from "@/service";

//1.注册
export function user_register(payload={ }){
    return service.post('/api/user/register',payload)
} 
//2.登录
export function user_login(payload={}){
    return service.post('/api/user/login',payload);
}
//3.爆爆团 - 列表
export function tuan_list(payload={ }){
    return service.get('/api/tuan/list',{params:payload})
} 

//4.购物车列表
export function shopcart_list(payload={}){
    return service.get('/api/shopcart/list',{params:payload})
}
//5.店铺 - 详情
export function shop_shopinfo(payload={}){
    return service.get('/api/shop/shopinfo',{params:payload})
}
//6.店铺 - 搜索
export function shop_search(payload={}){
    return service.get('/api/shop/search',{params:payload})
}
//7.收货地址 - 列表
export function address_list(payload={}){
    return service.get('/api/address/list',{params:payload})
}
//8.收货地址 - 新建
export function address_add(payload={}){
    return service.post('/api/address/add',payload)
}
//9.收货地址 - 删除
export function address_del(payload={}){
    return service.post('/api/address/del',payload)
}
//10.收货地址 - 编辑
export function address_edit(payload={}){
    return service.post('/api/address/edit',payload)
}
//11.轮播图 - 列表
export function banner_list(payload={}){
    return service.get('/api/banner/list',payload)
}
//12.店铺 - 收藏列表
export function shop_favlist(payload={}){
    return service.get('/api/shop/favlist',{params:payload})
}
//13.店铺 - 收藏店铺
export function shop_fav(payload={}){
    return service.post('/api/shop/fav',payload)
}
//14.店铺 - 取消收藏店铺
export function shop_unfav(payload={}){
    return service.post('/api/shop/unfav',payload)
}
// 15.购物车 - 清空
export function shopcart_clear(payload={}){
    return service.post('/api/shopcart/clear',payload)
}
// 16.购物车 - 数量加1
export function shopcart_add(payload={}){
    return service.post('/api/shopcart/add',payload)
}
//17.购物车 - 数量减1
export function shopcart_sub(payload={}){
    return service.post('/api/shopcart/sub',payload)
}
